/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Headquarters.viewPerspective;

import java.awt.BorderLayout;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.beans.PropertyChangeEvent;
import javax.swing.JPanel;
import thePieces.theKing;
import thePieces.theSpritePieces;
import thePieces.theSpritePieces.colorOfPiexes;
import thePieces.theSpritePieces.kindOfPieces;

/**
 *
 * @author ThanhTu
 */
public class whitePerspective extends perspective {
    
    /**
     * white perspective
     *
     */
    public whitePerspective(int w, int h)
    {
        super(w,h);
        this.View = new theSpritePieces[8][8];
        this.View[0][0] = new theKing("ChessForImages\\Middle Ages Theme\\RookBlack.png",mapPoint.getFromXY(0,0),colorOfPiexes.black,this);
        this.View[0][1] = new theKing("ChessForImages\\Middle Ages Theme\\KnightBlack.png",mapPoint.getFromXY(0,1),colorOfPiexes.black,this);
        this.View[0][2] = new theKing("ChessForImages\\Middle Ages Theme\\BishopBlack.png",mapPoint.getFromXY(0,2),colorOfPiexes.black,this);
        this.View[0][3] = new theKing("ChessForImages\\Middle Ages Theme\\QueenBlack.png",mapPoint.getFromXY(0,3),colorOfPiexes.black,this);
        this.View[0][4] = new theKing("ChessForImages\\Middle Ages Theme\\KingBlack.png",mapPoint.getFromXY(0,4),colorOfPiexes.black,this);
        this.View[0][5] = new theKing("ChessForImages\\Middle Ages Theme\\BishopBlack.png",mapPoint.getFromXY(0,5),colorOfPiexes.black,this);
        this.View[0][6] = new theKing("ChessForImages\\Middle Ages Theme\\KnightBlack.png",mapPoint.getFromXY(0,6),colorOfPiexes.black,this);
        this.View[0][7] = new theKing("ChessForImages\\Middle Ages Theme\\RookBlack.png",mapPoint.getFromXY(0,7),colorOfPiexes.black,this);
        this.View[1][0] = new theKing("ChessForImages\\Middle Ages Theme\\PawnBlack.png",mapPoint.getFromXY(1,0),colorOfPiexes.black,this);
        this.View[1][1] = new theKing("ChessForImages\\Middle Ages Theme\\PawnBlack.png",mapPoint.getFromXY(1,1),colorOfPiexes.black,this);
        this.View[1][2] = new theKing("ChessForImages\\Middle Ages Theme\\PawnBlack.png",mapPoint.getFromXY(1,2),colorOfPiexes.black,this);
        this.View[1][3] = new theKing("ChessForImages\\Middle Ages Theme\\PawnBlack.png",mapPoint.getFromXY(1,3),colorOfPiexes.black,this);
        this.View[1][4] = new theKing("ChessForImages\\Middle Ages Theme\\PawnBlack.png",mapPoint.getFromXY(1,4),colorOfPiexes.black,this);
        this.View[1][5] = new theKing("ChessForImages\\Middle Ages Theme\\PawnBlack.png",mapPoint.getFromXY(1,5),colorOfPiexes.black,this);
        this.View[1][6] = new theKing("ChessForImages\\Middle Ages Theme\\PawnBlack.png",mapPoint.getFromXY(1,6),colorOfPiexes.black,this);
        this.View[1][7] = new theKing("ChessForImages\\Middle Ages Theme\\PawnBlack.png",mapPoint.getFromXY(1,7),colorOfPiexes.black,this);
        
        for(int i=2; i< 6; i++)
        {
            for(int j = 0 ; j < 8; j++)
            {
                this.View[i][j] = null;
            }
        }
        
        this.View[6][0] = new theKing("ChessForImages\\Middle Ages Theme\\PawnWhite.png",mapPoint.getFromXY(6,0),colorOfPiexes.white,this);
        this.View[6][1] = new theKing("ChessForImages\\Middle Ages Theme\\PawnWhite.png",mapPoint.getFromXY(6,1),colorOfPiexes.white,this);
        this.View[6][2] = new theKing("ChessForImages\\Middle Ages Theme\\PawnWhite.png",mapPoint.getFromXY(6,2),colorOfPiexes.white,this);
        this.View[6][3] = new theKing("ChessForImages\\Middle Ages Theme\\PawnWhite.png",mapPoint.getFromXY(6,3),colorOfPiexes.white,this);
        this.View[6][4] = new theKing("ChessForImages\\Middle Ages Theme\\PawnWhite.png",mapPoint.getFromXY(6,4),colorOfPiexes.white,this);
        this.View[6][5] = new theKing("ChessForImages\\Middle Ages Theme\\PawnWhite.png",mapPoint.getFromXY(6,5),colorOfPiexes.white,this);
        this.View[6][6] = new theKing("ChessForImages\\Middle Ages Theme\\PawnWhite.png",mapPoint.getFromXY(6,6),colorOfPiexes.white,this);
        this.View[6][7] = new theKing("ChessForImages\\Middle Ages Theme\\PawnWhite.png",mapPoint.getFromXY(6,7),colorOfPiexes.white,this);
        this.View[7][0] = new theKing("ChessForImages\\Middle Ages Theme\\RookWhite.png",mapPoint.getFromXY(7,0),colorOfPiexes.white,this);
        this.View[7][1] = new theKing("ChessForImages\\Middle Ages Theme\\KnightWhite.png",mapPoint.getFromXY(7,1),colorOfPiexes.white,this);
        this.View[7][2] = new theKing("ChessForImages\\Middle Ages Theme\\BishopWhite.png",mapPoint.getFromXY(7,2),colorOfPiexes.white,this);
        this.View[7][3] = new theKing("ChessForImages\\Middle Ages Theme\\QueenWhite.png",mapPoint.getFromXY(7,3),colorOfPiexes.white,this);
        this.View[7][4] = new theKing("ChessForImages\\Middle Ages Theme\\KingWhite.png",mapPoint.getFromXY(7,4),colorOfPiexes.white,this);
        this.View[7][5] = new theKing("ChessForImages\\Middle Ages Theme\\BishopWhite.png",mapPoint.getFromXY(7,5),colorOfPiexes.white,this);
        this.View[7][6] = new theKing("ChessForImages\\Middle Ages Theme\\KnightWhite.png",mapPoint.getFromXY(7,6),colorOfPiexes.white,this);
        this.View[7][7] = new theKing("ChessForImages\\Middle Ages Theme\\RookWhite.png",mapPoint.getFromXY(7,7),colorOfPiexes.white,this);
        /*for(int i = 0; i < 8; i++)
        {
            for(int j = 0 ; j< 8; j++)
            {
                this.add(this.View[i][j]);
                //this.View[i][j].addMouseListener(this);
            }
        }*/
        this.side =  colorOfPiexes.white;
        this.xActive = -1;
        this.yActive = -1;
        //this.currentThread.start();
        
    }

    


    
}
